using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TestImport
{
    public partial class GroepenBeherenBis : TestImport.GroepenBeheren
    {
        public GroepenBeherenBis()
        {
            InitializeComponent();
            this.BackColor = InstParameters.Default.schermkleur;
            InstellenGroepenBeherenBis();
        }

        private void InstellenGroepenBeherenBis()
        {
            this.Text = "Invullen jaar en omschrijving groepen";
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
            dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Maroon;
            this.dataGridViewJaar.DefaultCellStyle = dataGridViewCellStyle1;
            this.dataGridViewOmschrijving.DefaultCellStyle = dataGridViewCellStyle1;
            this.dataGridViewJaar.ReadOnly = false;
            this.dataGridViewOmschrijving.ReadOnly = false;
            Nieuw.Enabled = false;
            Wijzig.Enabled = false;
            Wis.Enabled = false;
            Registreer.Enabled = false;
            RegistreerEnNieuw.Enabled = false;
            Annuleer.Enabled = false;
            this.groepDataGridView.AllowUserToAddRows = false;
        }

        protected  override void  GroepenBeheren_FormClosing(object sender, FormClosingEventArgs e)
        {
          
                DialogResult result = MessageBox.Show("De wijzigingen in groepsinfo registreren?", "Registreer groepsinfo?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result == DialogResult.Yes)
                {
                    this.Validate();
                    this.groepBindingSource.EndEdit();
                    this.groepTableAdapter.Update(this.onsBoekenPakketDataSet.Groep);
                }
            
        }
    
    }
}

